<template>
  <div class="classify">
    <ul class="left">
      <li class="active"><a>iQOO</a></li>
      <li><a>NEX</a></li>
      <li><a>X系列</a></li>
      <li><a>S系列</a></li>
      <li><a>Y系列</a></li>
      <li><a>Z系列</a></li>
      <li><a>U系列</a></li>
      <li><a>手机充电</a></li>
      <li><a>手机配件</a></li>
      <li><a>音乐设备</a></li>
      <li><a>智能硬件</a></li>
      <li><a>游戏摄影</a></li>
      <li><a>日用出行</a></li>
    </ul>
    <div class="right">
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">iQOO</div>
        <div class="pruducts">
          <a href="#/prodetail">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
            <div class="hotsort">热销</div>
          </a>
          <a href="#/prodetail">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
            <div class="recommend">推荐</div>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">NEX</div>
        <div class="pruducts">
          <a href="#/prodetail">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#/prodetail">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#/prodetail">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#/prodetail">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">X系列</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">S系列</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">Y系列</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">Z系列</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">U系列</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">手机充电</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">手机配件</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">音乐设备</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">智能硬件</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">游戏摄影</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
      <div class="category">
        <a href="#" class="banner-map"><img src="../images/banner_map.png" alt=""></a>
        <div class="title">日用出行</div>
        <div class="pruducts">
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
          <a href="#">
            <img src="../images/product.png" alt="">
            <p class="title">iQOO U1x 全网通版6G手机</p>
            <p class="detial">高通骁龙662，5000mAh大电池</p>
            <p class="price">￥1999</p>
          </a>
          <a href="#">
            <img src="../images/product1.png" alt="">
            <p class="title">iQOO5 5G版 8GB+128GB大内存</p>
            <p class="detial">高通骁龙865，5000mAh大电池</p>
            <p class="price">￥2799</p>
          </a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  //帕斯卡命名 FullName
  function Classify() {
    $('.header span').text('全部分类');
    $('.header a').css('display', 'none');
    $('.app .footbar').css('display', 'flex');
    $('.app .footbar a:eq(1)').css('display', 'flex');
    $('.app .footbar a:eq(2)').css('display', 'flex');
    $('.app .footbar a.buy').css('display', 'none');

    // var kaiguan = true;  
    // //缓存每个类别距离顶部的高度
    // var arr = [];
    // setTimeout(function(){
    //   arr = $('.main .classify .right .category').map(function(){
    //     return $(this).position().top;
    //   }).get();
    //   console.log(arr);
    // },100)


    // $('.main .classify .left').on('click', 'li', function () {
    //   kaiguan = false;
    //   var top = arr[$(this).index()];
    //   $(this).addClass('active').siblings('li').removeClass('active');
    //   $('.right').stop().animate({scrollTop: top},300);   
    // });

    // //当滚轮滚动时，便开启右侧滚动自动给左侧导航标记选中着色效果
    // window.onwheel = function(ev){
    //   var content = document.querySelector('.main .classify .right');
    //   var isContentScrolling = content && content.contains(ev.target);
    //   if( isContentScrolling ) {
    //     //开启滚动监测着色效果
    //     kaiguan = true;
    //   }
    // }

    // $('.main .classify .right').on('scroll', function(){
    //   if (!kaiguan) return;
    //   $(this).find('.category').each(function (i, item) {
    //     if ($(item).position().top <= 0 && $(item).position().top >= - $(item).innerHeight()) {
    //       $('.main .classify .left li').eq(i)[0].scrollIntoView({behavior:"smooth"});
    //       $('.main .classify .left li').eq(i).addClass('active').siblings('li').removeClass('active');
    //     };
    //   });
    // });
    var kaiguan = true;
    //缓存每个类别距离顶部的高度
    var arr = [];

    $('.main .classify .left').on('click', 'li', function () {
      kaiguan = false;
      $(this).addClass('active').siblings('li').removeClass('active');
      $('.main .classify .right .category')[$(this).index()].scrollIntoView({
        behavior: "smooth"
      });
    });

    //当滚轮滚动时，便开启右侧滚动自动给左侧导航标记选中着色效果
    window.onwheel = function (ev) {
      var content = document.querySelector('.main .classify .right');
      var isContentScrolling = content && content.contains(ev.target);
      if (isContentScrolling) {
        //开启滚动监测着色效果
        kaiguan = true;
      }
    }
    //触屏事件触发
    document.querySelector('.main .classify .right').addEventListener('touchstart', function () {
      //开启滚动监测着色效果
      kaiguan = true;
    });

    $('.main .classify .right').on('scroll', throttle(function () {
      if (!kaiguan) return;
      $(this).find('.category').each(function (i, item) {
        if ($(item).position().top <= 0 && $(item).position().top >= -$(item).innerHeight()) {
          $('.main .classify .left li').eq(i)[0].scrollIntoView();
          $('.main .classify .left li').eq(i).addClass('active').siblings('li').removeClass('active');
        };
      });
    },60));

    //节流函数，防止滚动时执行过快
    function throttle(func, delay) {
      var prev = Date.now();
      return function () {
        var context = this;
        var args = arguments;
        var now = Date.now();
        if (now - prev >= delay) {
          func.apply(context, args);
          prev = Date.now();
        }
      }
    }
  }
</script>